from config import HOST


class ApiApproveTrust:
    #初始化
    def __init__(self,session):
        self.session=session
        self.__url_approve=HOST+"/member/realname/approverealname "
        self.__url_approve_status=HOST+"/member/member/getapprove "
        self.__url_trust=HOST+"/trust/trust/register "
        pass

    #1、认证接口 封装
    def api_approve(self):
        data={
            "realname":"张三",
            "card_id":"110101199709117934"
        }
        #请求数据为multipart/form-data  ->data+files files 随便传
        return self.session.post(url=self.__url_approve,data=data,files={"x":"y"})

    #2、查询认证接口 封装
    def api_approve_status(self):
        return self.session.post(url=self.__url_approve_status)

    #3开户接口
    def api_trust(self):
        return self.session.post(url=self.__url_trust)
